<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
	  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg">

<div class="container-div">
	<div class="row">

		<div class="btn-group-sm" id="toolbar" role="group">
			<a class="btn btn-info" onclick="goBack()">
				<i class="fa fa-backward">返回</i>
			</a>

		</div>
		<div class="col-sm-12 select-table table-striped">
			<input type="hidden" id="dataId" th:field="*{management.dataId}">
			<div class="wrapper wrapper-content animated fadeInRight ibox-content" >
				<form class="form-horizontal m" id="form-enter-add" style="margin-top: 50px">
					<h3>客户信息</h3>
					<div class="row">
						<div class="col-sm-6">
							<div class="form-group">
								<label class="col-sm-2 control-label" style="font-size: 18px"></label>
								<div class="col-sm-10" >
									<span th:text="*{management.wangwangNumber}" style="font-size: 22px"></span>
								</div>
							</div>
						</div>
						<div class="col-sm-6">
							<div class="form-group">
								<label class="col-sm-4 control-label" style="font-size: 18px">拨通次数：</label>
								<div class="col-sm-8" style="padding-top: 7px">
									<span th:text="*{management.contactsNumber}" style="font-size: 18px"></span>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-sm-6">
							<div class="form-group">
								<label class="col-sm-4 control-label" style="font-size: 18px">客户姓名：</label>
								<div class="col-sm-8" style="padding-top: 7px">
									<span th:text="*{management.customerName}" style="font-size: 18px"></span>
								</div>
							</div>
						</div>
						<div class="col-sm-6">
							<div class="form-group">
								<label class="col-sm-4 control-label" style="font-size: 18px">产品名称：</label>
								<div class="col-sm-8" style="padding-top: 7px">
									<span th:text="*{management.productName}" style="font-size: 18px"></span>
								</div>
							</div>
						</div>
					</div>
					<div class="row">
						<div class="col-sm-6">
							<div class="form-group">
								<label class="col-sm-4 control-label" style="font-size: 18px">联系电话：</label>
								<div class="col-sm-8" style="padding-top: 7px">
									<span th:text="*{management.customerPhone}" style="font-size: 18px"></span>
								</div>
							</div>
						</div>
						<div class="col-sm-6">
							<div class="form-group">
								<label class="col-sm-4 control-label" style="font-size: 18px">联系地址：</label>
								<div class="col-sm-8" style="padding-top: 7px">
									<span th:text="*{management.customerAddress}" style="font-size: 18px"></span>
								</div>
							</div>
						</div>
					</div>


				</form>
				<div style="text-align:center;margin-top: 250px">
					<button type="button" class="btn btn-success" onclick="getCustomer()">淘到客户</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<button type="button" class="btn btn-warning" onclick="nextContact()">下次联系</button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<button type="button" class="btn btn-danger" onclick="noContact()">不再联系</button>
				</div>
			</div>

		</div>
	</div>
</div>
<div th:include="include :: footer"></div>
<script th:src="@{/ajax/libs/select/select2.js}"></script>
<script th:inline="javascript">
	// var removeFlag = [[${@permission.hasPermi('enter:enter:remove')}]];
    var prefix = ctx + "management/management";

    // 返回的方法
	function goBack(){
		window.history.go(-1);  //返回上一页
	}

    
    // 不在联系的方法
	function noContact() {
		// 获取对应的id信息
		var dataId = $("#dataId").val();
		$.ajax({
			url:prefix + "/noContact?dataId="+dataId,		//请求地址
			type:"get",			//请求方式
			success:function(data){  //回调函数：数据请求成功之后调用
				console.log(data);  				 //这里的data:从服务器发送回来的数据
			}
		})
		goBack()
	}
    // 淘到客户
	function getCustomer() {
		// 获取对应的id信息
		var dataId = $("#dataId").val();
		$.ajax({
			url:prefix + "/getCustomer?dataId="+dataId,		//请求地址
			type:"get",			//请求方式
			success:function(data){  //回调函数：数据请求成功之后调用
				console.log(data);  				 //这里的data:从服务器发送回来的数据
			}
		})
		goBack()
	}
	// 下次联系
	function nextContact() {
		var dataId = $("#dataId").val();
		$.ajax({
			url:prefix + "/nextContact?dataId="+dataId,		//请求地址
			type:"get",			//请求方式
			success:function(data){  //回调函数：数据请求成功之后调用
				console.log(data);  				 //这里的data:从服务器发送回来的数据
			}
		})
		goBack()
	}








</script>
</body>>
</form>
</html>